CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(xdog-demo)

SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" )
SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "limited configs" FORCE)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

INCLUDE(Utils)
INCLUDE(SetupCPack)

INCLUDE(CPack)
CONFIGURE_FILE(version.h.in ${PROJECT_BINARY_DIR}/version.h @ONLY)

INCLUDE(SetupCUDA)

FIND_PACKAGE(Libav QUIET)
IF(LIBAV_FOUND)
    ADD_DEFINITIONS(/DHAVE_LIBAV)
ENDIF()

FIND_PACKAGE(Qt4)

ADD_SUBDIRECTORY(gpu)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(util)
